<extend name="base"/>
<block name="body">

<script language="javascript">
	$(document).ready(wechat_obj.attention_init);
</script>
	<div id="attention" class="r_con_wrap">
		<form id="attention_reply_form" class="r_con_form" method="post"
			action="">
			<div class="rows">
				<label>回复类型</label> <span class="input"> 
				<select name="ReplyMsgType">
						<option value="0" <eq name="userEvent.msgtype" value="text">selected="selected"</eq> >文字消息</option>
						<option value="1" <eq name="userEvent.msgtype" value="text"><else/>selected="selected"</eq>>图文消息</option>
				</select>
				</span> 
				<div class="clear"></div>
			</div>
			<div class="rows" id="text_msg_row">
				<label>回复内容</label> <span class="input"><textarea
						name="TextContents">{$userEvent.textmsg.text}</textarea></span>
				<div class="clear"></div>
			</div>
			<div class="rows" id="img_msg_row">
				<label>回复内容</label> <span class="input"> 
				  <select name='MaterialId'>
						<option value=''>--请选择--</option>
						<optgroup label='---------------图文消息---------------'></optgroup>
                              <foreach name="newsmsgs" item="v">
                                  <option value='{$v.id}' <eq name="userEvent.msgid" value="$v.id">selected="selected"</eq>>【<eq name="v.msgtype" value="onenews">单图文<else/>多图文</eq>】{$v.title}</option>
                              </foreach>
				</select>
				<a href="{:U('Material/index')}" class="material">素材管理</a></span>
				<div class="clear"></div>
			</div>
			<div class="rows" id="img_msg_row">
				<label>任意关键词</label> <span class="input">
				<input type="checkbox" value="1" <eq name="userEvent.arbitrarily" value="1" >checked</eq> name="arbitrarily" /><span
					class="tips">开启（开启后，当输入的关键字无相关的匹配内容时，则使用本设置回复）</span></span>
				<div class="clear"></div>
			</div>
			<div class="rows">
				<label></label> 
				<span class="input">
				  <input type="submit" class="btn_green" name="submit_button" value="提交保存" />
				  <input type="hidden" name="event" value="subscribe" />
				  
				</span>
				<div class="clear"></div>
			</div>
			<input type="hidden" name="do_action"
				value="wechat.attention_reply">
		</form>
	</div>
</block>